package org.abacus.beans;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import org.abacus.model.SysAction;
import org.junit.Test;

public class ClassInfoFactoryImplTest {

	@Test
	public void classInfoFactoryTest() {
		java.beans.Introspector s;
		ClassInfoFactory cif = ClassInfoFactory.getInstance();
		{
			cif.excludeMethod("hashCode");
			cif.excludeMethod("equals");
			cif.excludeMethod("toString");
			// cif.startsWithMethod("get");
			// cif.startsWithMethod("set");
		}

		ClassInfo ci = cif.getClassInfo(new SysAction().getClass());
		FieldInfo fi = ci.getFieldInfo();
		MethodInfo mi = ci.getMethodInfo();

		for (Field f : fi.getFields()) {
			System.out.println(f.getName());
		}
		System.out.println("=====================================");
		for (Method m : mi.getMethods()) {
			System.out.println(m.getName());
		}
	}
}
